export function needLogin(that) {
  if (that.$mp.page.route !== '/pages/user/login') {
    const token = uni.getStorageSync('token')
    if(!token) { // 未登录
      uni.clearStorageSync()
      uni.redirectTo({
        url: '/pages/user/login'
      })
    }
  }
  console.log(that.$mp.page.route)
}
